import { createRouter, createWebHistory } from "vue-router";

const routes = [
    {
        // 主页路由
        path: '/',
        name: '/',
        redirect: 'recipes-home'
    },
    {
        // 主页路由
        path: '/recipes-home',
        name: 'recipes-home',
        component: () => import('../view/recipesHome.vue'),
    },
    {
        // 分类页路由
        path: '/recipes-sort',
        name: 'recipes-sort',
        component: () => import('../view/recipesSort.vue')
    },
    {
        // 更多功能路由
        path: '/more-feature',
        name: 'more-feature',
        component: () => import('../view/moreFeature.vue')
    }
];

const router = createRouter({
    routes,
    history: createWebHistory()
});

export default router;